import * as React from 'react';
import {Datagrid} from "@/components/datagrid";
import {Form} from "@/components/form"
import {serverFetch} from "@/components/server-fetch";


export default async function Page() {
    const api_type = 'padmanagement'
    const data = await serverFetch(api_type)
    const dataJson = {
        padManagementId: {name: 'PAD编号', type: 'number'},
        name: {name: 'PAD名称', type: 'string'},
        ip: {name: 'ip地址', type: 'string'},
        status: {name: '状态', type: 'string'},
        workstationName: {name: '工位名称', type: 'string'},
        mac: {name: 'mac地址', type: 'string'},
        printerIp: {name: '打印机ip', type: 'string'},
    }
    return (
        <main className='px-5'>
            <p className="text-3xl py-5">
                # PAD信息
            </p>
            <Datagrid rows={data.data} keyword={'padManagementId'} list={dataJson} type={api_type}/>
            <Form list={dataJson} type={api_type}/>
        </main>
    )
}
